home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / cancelbt / modeless.frm < prev   
Text File  |  1995-09-06  |  1KB  |  44 lines

  1. VERSION 2.00
  2. Begin Form CanDialog 
  3.    Caption         =   "Modeless Cancel Dialog"
  4.    ClientHeight    =   1425
  5.    ClientLeft      =   1650
  6.    ClientTop       =   2415
  7.    ClientWidth     =   4095
  8.    Height          =   1830
  9.    HelpContextID   =   102
  10.    Left            =   1590
  11.    LinkTopic       =   "Form2"
  12.    ScaleHeight     =   1425
  13.    ScaleWidth      =   4095
  14.    Top             =   2070
  15.    Width           =   4215
  16.    Begin CommandButton Command1 
  17.       Caption         =   "&Cancel"
  18.       Height          =   495
  19.       Left            =   1380
  20.       TabIndex        =   0
  21.       Top             =   480
  22.       Width           =   1215
  23.    End
  24. End
  25. DefInt A-Z
  26.  
  27. Declare Sub SetWindowWord Lib "User" (ByVal hWnd, ByVal nCmd, ByVal nVal)
  28.  
  29. Const SWW_HPARENT = -8
  30.  
  31. Sub Command1_Click ()
  32.     MainForm.Text1.Tag = "Canned!"
  33.     Unload Me
  34. End Sub
  35.  
  36. Sub Form_Load ()
  37.    SetWindowWord hWnd, SWW_HPARENT, MainForm.hWnd
  38. End Sub
  39.  
  40. Sub Form_Unload (Cancel As Integer)
  41.    SetWindowWord hWnd, SWW_HPARENT, 0
  42. End Sub
  43.  
  44.